package com.lifeCicle.validators;

import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;

public class MyValidator implements Validator {

    public void validate(FacesContext facesContext, UIComponent uIComponent,Object object) throws ValidatorException {
        System.out.println("MyValidator validate: " + object);
        if(object.toString().equals("200")){
            throw new ValidatorException(new FacesMessage("Validation failed."));
        }
       
    }
}
